package usr;

import book.BookList;
import operation.IOPeration;

public abstract class User {
    protected String name;
    //此时不分配内存
    protected IOPeration [] array;
    public User(String name) {
        this.name = name;
    }

    public abstract int menu();

    public void doWork(int choice, BookList bookList){
        //调用方法：
//        array[choice].work(bookList);
        IOPeration ioPeration = array[choice];
        ioPeration.work(bookList);
    }
}
